package common

import (
	"fmt"
	"github.com/go-redis/redis"
)

// just for test

func RedisInit() *redis.Client {
	client := redis.NewClient(&redis.Options{
		Addr:     "127.0.0.1:6379",
		Password: "", // no password set
		DB:       0,  // use default DB
	})

	pong, err := client.Ping().Result()
	if err != nil {
		fmt.Println(err.Error())
		panic(err.Error())
	}

	fmt.Println("new version")
	fmt.Println(pong, err)
	return client
}
